package com.tree;

public class TestTreeMain {

	public static void main(String[] args) {

		TreeNode root = new TreeNode(1);
		root.left = new TreeNode(2);
		root.left.left = new TreeNode(4);
		root.left.right = new TreeNode(5);
		
		root.right = new TreeNode(3);
		root.right.left = new TreeNode(6);
		root.right.right = new TreeNode(7);
		
		PrintTree p = new PrintTree();
		
		p.print(root);
		
		
		System.out.println("\n****************");
		root = new RevertTree().revert(root);
		
		p.print(root);
		
		System.out.println("\n****************");
		
		System.out.println("Leaf Count:" + new LeafCounter().count(root));
		
		System.out.println("****************");
		
		p.print(new SwapChildren().swap(root));
		
	}
	
	

}
